﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
using GC_VKMD.MusicDownloader.Managers;
using GC_VKMD.MusicDownloader.Services;

namespace GC_VKMD.Test
{
	class Program
	{
		private static void Main(string[] args)
		{
			//<add key="Token" value="643664a2ec447c3dfa975c9c201fe852dce93750dbdfbebb8df048e96fcc2f877237139fe2c98959238f9" />
			//<add key="UserId" value="20583652" />

			var service = new VKService("957d7ed87707f24baf83e9972d5ef9b15c2b8257071cffcb1cea53aa548167bb3e43a601d72fde8c2f996",
				"58316319");
			var result = service.GetAudioTracksCount();

			var s = service.GetAudio(4);

			var manager = new VKAudioFileManager();
			var sb = new StringBuilder();

			manager.DownloadFiles(s, "d:/", s1 => sb.AppendLine(s1), s1 => sb.AppendLine(s1));

			Console.WriteLine(sb.ToString());
			Console.ReadLine();
		}
	}
}
